package com.study.day20190710;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ExecutorsTest {
    public static void main(String[] args) {
        ExecutorService pool= Executors.newSingleThreadExecutor();
        pool.execute(()->{
            for (int i = 0; i< 20;i++) {
                System.out.println(Thread.currentThread().getName()+":"+i);
            }
        });
        pool.shutdown();
    }
}
